<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:composition template="/pages/template/admin_main.xhtml">
	
		<ui:define name="title">
		    تكوين - الأدمن
		</ui:define>
		
		<div class="content">
		
			<ui:define name="content">
				
				<h:form id="f1" dir="rtl">
					<p:messages />
					
					<p:commandButton id="cb1" value="اضافة صفحة" action="#{pagesBean.preCreatePage}" ajax="false" immediate="true" />
					
					<div style="margin-top:15px;" ></div>
	       			  
					<p:dataTable value="#{pagesBean.pagesSummary}" var="page" scrollable="true" scrollHeight="150">
						
						<p:column headerText="الصفحة" width="70%">
							<p:outputLabel value="#{page.title}" />
						</p:column>
						
						<p:column headerText="اجراءات" style="text-align:center;">
							<p:commandLink value="تعديل" action="#{pagesBean.preEditPage(page)}" ajax="false" />
							<p:spacer width="20px" />
							<p:commandLink value="حذف" action="#{pagesBean.preDeletePage(page)}" ajax="false" />
						</p:column>
						
					</p:dataTable>
					
				</h:form>
			
			</ui:define>
		</div>
	</ui:composition>
</html>